package cn.zwk.product.service;

import cn.zwk.product.vo.Catelog2Vo;
import com.baomidou.mybatisplus.extension.service.IService;
import cn.zwk.common.utils.PageUtils;
import cn.zwk.product.entity.CategoryEntity;

import java.util.List;
import java.util.Map;

/**
 * 商品三级分类
 *
 * @author zwk
 * @email ${email}
 * @date 2024-04-19 15:06:08
 */
public interface CategoryService extends IService<CategoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    List<CategoryEntity> listWithTree();

    /**
     * 获取当前节点到根节点的链条
     * @param catId:当前节点
     * @return:一个包含list集合的R对象
     */
    List<CategoryEntity> findCatelogPath(Long catId);

    void updateDetail(CategoryEntity category);

    List<CategoryEntity> getLevel1Categorys();

    Map<String, List<Catelog2Vo>> getCatalogJson();
}

